﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Thrift.Server;
using Thrift.Transport;
using Microsoft.Practices.Unity.InterceptionExtension;
using Thrift.IL;
namespace TestAOP
{
    public class RemoteCommandBehavior : Project.InterceptionBehaviors.InterceptionBase
    {
        public override IMethodReturn Invoke(
            IMethodInvocation input,
            GetNextInterceptionBehaviorDelegate getNext)
        {
            Console.WriteLine("lanjie");
            ThriftHandle.MultiplexedProcessor.RegisterProcessor("RemoteCommandHandler", new RemoteCommandSpace.RemoteCommand.Processor(new RemoteCommandHandler()));
            return getNext().Invoke(input, getNext);
        }
    }
}
